<template>
  <div class="app-container">
    <el-tabs v-model="activeTab" @tab-click="handleTabClick">
      <el-tab-pane label="工单列表" name="detail">
        <project-detail v-if="activeTab === 'detail'" />
      </el-tab-pane>

      <el-tab-pane label="工单下发" name="user">
        <project-user-template v-if="activeTab === 'user'" />
      </el-tab-pane>

      <el-tab-pane label="基础模板" name="template">
        <project-template     v-if="activeTab === 'template'" />
      </el-tab-pane>


    </el-tabs>
  </div>
</template>

<script>
import ProjectTemplate from './template.vue'
import ProjectDetail from './detail.vue'
import ProjectUserTemplate from './userTemplate.vue'

export default {
  name: 'ProjectDetailPage',
  components: { ProjectTemplate, ProjectDetail, ProjectUserTemplate },
  data() {
    return {
      activeTab: 'detail',
      params: {}
    }
  },
  mounted() {
    // 接收query参数
    // this.params = this.$route.query;
    // console.log('接收到的参数:', this.params);
  },
  methods: {
    handleTabClick(tab) {
      console.log('切换到标签:', tab.name)
    },
  }
}
</script>
